<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <!--使用-->
        <mycomponent></mycomponent>
    </div>
    <script src="../../js/vue.js"></script>
    <script>
        //创建一个组件构造器
        var myComponent = Vue.extend({
            template: '<div>this is my first component!</div>'
        });

        //注册组件
        Vue.component("mycomponent", myComponent);

        var vue = new Vue({
            el: '#app',
        })

    </script>
</body>
</html>